<?php
/**
 * The following variables are available in this template:
 * - $this: the BootCrudCode object
 */
?>
<?php
echo "<?php\n";
$label=$this->pluralize($this->class2name($this->modelClass));
echo "\$this->breadcrumbs=array(
    '$label'=>array('list'),
);\n";
?>

$this->menu=array(
    array('label'=>'Create <?php echo $this->modelClass; ?>','url'=>array('create')),
    //array('label'=>'Manage <?php echo $this->modelClass; ?>','url'=>array('admin')),
);
?>

<h1><?php echo $label; ?></h1>

<?php echo "<?php"; ?> $this->widget('bootstrap.widgets.TbGridView',array(
    'dataProvider'=>$dataProvider,
    'columns'=>array(
        array('name'=>'id', 'header'=>'#'),
<?php 
$count=0;
foreach($this->tableSchema->columns as $column)
{
    if($column->name != 'delmark' && 
       $column->name != 'created_date' &&
       $column->name != 'updated_date' &&
       $column->name != 'active' && 
       $column->isPrimaryKey != 1        
    ) {
        echo "        array('name'=>'{$column->name}'),\n";
    }
    if ($column->name == 'active') {
        echo "        array('name'=>'activeFlag', 'header'=>'Active'),\n";
    }
}
?>
        array(
            'class'=>'bootstrap.widgets.TbButtonColumn',
            'htmlOptions'=>array('style'=>'width: 50px'),
        ),
    ),
)); ?>
